<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>marker</title>
		<meta name="viewport" content="initial-scale=1.0, user-scalable=no">
		<!--加载样式表-->
		<link rel="stylesheet" href="demo-center.css"/>
		<!--加载地图js-->
		<script type="text/javascript" src="https://webapi.amap.com/maps?v=1.4.15&key=80dcce144694739ec6f22a2e9d0bfb0f"></script>
	</head>
	<body>
<div class="mapBox">
	<!--地图容器-->
	<div id="container"></div>
</div>

<script>
		var map = new AMap.Map("container", {
			center: [116.400274, 39.905812],
			zoom: 14
		});
		
		var clickHandler = function(e) {
		  alert('您在[ '+e.lnglat.getLng()+','+e.lnglat.getLat()+' ]的位置点击了地图！');
		};

		// 绑定事件
		map.on('click', clickHandler);
		// // 解绑事件
		// map.off('click', clickHandler);
</script>
		<style>
			.mapBox {
				width: 800px;
				height: 600px;
				position: relative;
			}
			html, body, #container {
				height: 100%;
				width: 100%;
			}
		</style>
	</body>
</html>
